# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
from WindPy import w
from StockMarket import *
from Utils import *
import json
from datetime import datetime


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    # Start WindPy connection
    w.start()

    # Retrieve the wind codes of the constituent
    # getSectorConstituentCode('a001010100000000')
    getBarData("000001.SZ", "2021-01-22 09:00:00", "2021-01-22 15:00:00", 'testbar')
#     w.start()  # 默认命令超时时间为120秒，如需设置超时时间可以加入waitTime参数，例如waitTime=60,即设置命令超时时间为60秒
#     w.isconnected() # 判断WindPy是否已经登录成功
    # print(w.isconnected())

